#include <iostream>
using namespace std;

int main(){
    for (int i = 0; i < 10; i++)
    {
        /* code */
        if(i == 5){
            break;
        }
        cout << i << endl;
    }
    for (int i = 0; i < 10; i++)
    {
        /* code */
        for (int j = 0; j < 10; j++)
        {
            /* code */
                    if(j == 5){
            break;
        }
        cout << "* ";
        }
        cout << endl;

    }
    return 0;
}